<template>
	<view class="banner_top">
		<!-- 下拉框 -->
	
		<!-- 下拉框结束 -->
		<view class="two_box">
			<view v-for="(item, index) in carList" :key="index" class="twoList">
				<image :src="item.cover"></image>
				<view style="width:336rpx;">
					<view>
						<view
							style="display:inline-block;padding:5rpx 10rpx;border-radius: 10rpx;background-color: orange;">
							腾发自营</view>{{item.carName}}
					</view>
					<view>/{{item.mileage}}万公里</view>
					<view style="color:red;font-size: 40rpx;font-weight: blod;">{{item.currentPrice}}</view>

				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getCar
	} from "../../untils/ajxas.js";
	export default {
		data() {
			return {
				carList: [],
				}
		},
		beforeCreate() {
			getCar({
				page: 1,
			}).then(res => {
				console.log(res);
				this.carList = res.data.data.content
			})
		},
		methods: {
         
		}
	}
</script>

<style>
	/* 小爱拉框 */
	
	/* 小爱拉框 */
	.banner_top {
		width: 750rpx;
		margin: 0 auto;
	}

	.two_box {
		width: 720rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		margin: 8rpx auto;
	}

	.twoList {
		margin-top: 50rpx;
		box-shadow: 1rpx 2rpx 5rpx 0rpx #ccc;
		background-color: #ffff;
	}

	.twoList image {
		border-radius: 10rpx;
		width: 336rpx;
		height: 200rpx;
	}
</style>